// webpack配置
const path = require('path')

const { addDecoratorsLegacy, override, addWebpackAlias, fixBabelImports } = require('customize-cra')

module.exports = override(
  addDecoratorsLegacy(),
  addWebpackAlias({
    '@': path.resolve('./src')
  }),
  // 打包时，按需打包加载antd-mobile类库,自动导入样式
  fixBabelImports('import', {
    libraryName: 'antd-mobile',
    style: 'css'
  })
)
